package cn.wolfcode.crm.query;

import cn.wolfcode.crm.util.MyDateUtil;
import freemarker.template.utility.DateUtil;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class CustomerChartQO extends QueryObject {
    private String keyword;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
    private String groupByType="e.name";

    public Date getEndDate(){
        return MyDateUtil.getEndDate(this.endDate);
    }
}
